<template>
    <div>

    </div>
</template>

<script>
export default {
    data() {
        return {
            initPageLoading: {},
        }
    },
    created() {
        this.openFullScreen();
    },
    mounted() {
        this.closeFullScreen();
    },

    methods: {
        openFullScreen() {
            this.initPageLoading = this.$loading({
                lock: true,
                text: '加载中，请稍后...',
                spinner: 'el-icon-loading',
                // background: 'rgba(0, 0, 0, 0.7)'
            })
        },
        closeFullScreen(){
            this.$store.dispatch('getUserInfo').then((res) => {
                if(res.bindinfo?.operator.ismanager == true){
                    localStorage.setItem('useTemplate',0)
                    this.$router.push('/datacenter')
                }else{
                    localStorage.setItem('useTemplate',1)
                    this.$router.push('/franchisee/datacenter')
                }
            }).finally(()=>{
                this.initPageLoading.close();
            })
        }
    }
}
</script>